package kr.hkit.powerjava.chapter07.Programming;

public class Date {

	private int year, month, date;

	Date() {
	}

	public Date(int year, int month, int date) {
		super();
		this.year = year;
		this.month = month;
		this.date = date;
	}

	public void setDate(int year, int month, int date) {
		this.year = year;
		this.month = month;
		this.date = date;
	}
	
	public int getYear() {
		return year;
	}

	public void setYear(int year) {
		this.year = year;
	}

	public int getMonth() {
		return month;
	}

	public void setMonth(int month) {
		this.month = month;
	}

	public int getDate() {
		return date;
	}

	public void setDate(int date) {
		this.date = date;
	}

	void print1() {
		System.out.println(year + "." + month + "." + date);
	}

	void print2() {
		String mon;
		switch (month) {
		case 1:
			mon = "January";
			break;
		case 2:
			mon = "February";
			break;
		case 3:
			mon = "March";
			break;
		case 4:
			mon = " April";
			break;
		case 5:
			mon = "May";
			break;
		case 6:
			mon = "June";
			break;
		case 7:
			mon = "July";
			break;
		case 8:
			mon = "August";
			break;
		case 9:
			mon = "September";
			break;
		case 10:
			mon = "October";
			break;
		case 11:
			mon = "November";
			break;
		case 12:
			mon = "December";
			break;
		default:
			mon = "오류입니다";
			break;
		}
		System.out.println(mon + " " + date + ", " + year);
	}
}
